﻿// -----------------------------------------------------------------------
//  <copyright file="Startup.cs" company="柳柳软件">
//      Copyright (c) 2014-2015 66SOFT. All rights reserved.
//  </copyright>
//  <site>http://www.66soft.net</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2015-12-07 16:16</last-date>
// -----------------------------------------------------------------------

using OSharp.Autofac.Mvc;
using OSharp.AutoMapper;
using OSharp.Core.Dependency;
using OSharp.Data.Entity;
using OSharp.Web.Mvc.Initialize;

using Owin;


namespace ZH.JY.Web
{
    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            IServicesBuilder builder = new ServicesBuilder();
            IServiceCollection services = builder.Build();
            services.AddDataServices();
            services.AddAutoMapperServices();
            services.AddCoreServices(app);

            IIocBuilder mvcIocBuilder = new MvcAutofacIocBuilder(services);
            app.UseOsharpMvc(mvcIocBuilder);
        }
    }
}